package com.ptl.bp.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ptl.bp.entity.BatteryPassport;
import com.ptl.bp.dto.BatteryPassportQueryDTO;
import com.ptl.bp.dto.CountDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface BatteryPassportMapper extends BaseMapper<BatteryPassport> {

    IPage<BatteryPassport> pageQuery(Page<BatteryPassport> page, @Param("queryDTO") BatteryPassportQueryDTO queryDTO);

    List<CountDTO> countByPublishStatus();

    List<CountDTO> countByMonth();

    List<CountDTO> countByYear();

    List<CountDTO> countByModel();

    List<CountDTO> countByManufacturer();
}